#! /usr/bin/env bash

# tp: tp gimp image batch tool
# Copyright (C) 2012 Juan Manuel Borges Caño

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

# cd images/

# scale seamless enhance emboss oilify cartoon mosaic cubism sharpen sobel laplace edgesobel edgelaplace neon dog noise spread desaturate softglow gauss 

for dir in "$@"
do
	echo "$dir"
	cd "$dir"
	for file in *.*
	do
		mkdir "${file%%.*}"
		cd "${file%%.*}"
		tp-gimp scale "../$file" "${file%%.*}-Scale.jpg"
		cd ../
	done
	cd ..
done

tp-gimp-images Scale seamless "$@"

for fop in enhance emboss oilify cartoon mosaic cubism sharpen sobel laplace edgesobel edgelaplace neon dog noise spread desaturate softglow gauss 
do
	tp-gimp-images ScaleSeamless "$fop" "$@"
done

tp-gimp-images ScaleSeamlessCartoon cartoon "$@"
tp-gimp-images ScaleSeamlessCartoonCartoon cartoon "$@"
tp-gimp-images ScaleSeamlessCartoon dog "$@"
tp-gimp-images ScaleSeamlessCartoonDog dog "$@"
tp-gimp-images ScaleSeamlessCartoon edgesobel "$@"
tp-gimp-images ScaleSeamlessCartoonEdgesobel dog "$@"
tp-gimp-images ScaleSeamlessCartoon emboss "$@"
tp-gimp-images ScaleSeamlessCartoonEmboss dog "$@"
tp-gimp-images ScaleSeamlessCartoonEmboss emboss "$@"
tp-gimp-images ScaleSeamlessCartoonEmboss laplace "$@"
tp-gimp-images ScaleSeamlessCartoon gauss "$@"
tp-gimp-images ScaleSeamlessCartoonGauss cartoon "$@"
tp-gimp-images ScaleSeamlessCartoon laplace "$@"
tp-gimp-images ScaleSeamlessCartoonLaplace cartoon "$@"
tp-gimp-images ScaleSeamlessCartoonLaplace dog "$@"
tp-gimp-images ScaleSeamlessCartoon sobel "$@"
tp-gimp-images ScaleSeamlessCartoonSobel dog "$@"
tp-gimp-images ScaleSeamlessDesaturate cartoon "$@"
tp-gimp-images ScaleSeamlessDesaturateCartoon desaturate "$@"
tp-gimp-images ScaleSeamlessDesaturate noise "$@"
tp-gimp-images ScaleSeamlessDesaturateNoise oilify "$@"
tp-gimp-images ScaleSeamlessDog cartoon "$@"
tp-gimp-images ScaleSeamlessDogCartoon sharpen "$@"
tp-gimp-images ScaleSeamlessEdgesobel cartoon "$@"
tp-gimp-images ScaleSeamlessEdgesobelCartoon laplace "$@"
tp-gimp-images ScaleSeamlessEdgesobel oilify "$@"
tp-gimp-images ScaleSeamlessEdgesobelOilify edgesobel "$@"
tp-gimp-images ScaleSeamlessEmboss cartoon "$@"
tp-gimp-images ScaleSeamlessEmbossCartoon cartoon "$@"
tp-gimp-images ScaleSeamlessEmbossCartoon laplace "$@"
tp-gimp-images ScaleSeamlessEmboss dog "$@"
tp-gimp-images ScaleSeamlessEmbossDog dog "$@"
tp-gimp-images ScaleSeamlessEmbossDog edgesobel "$@"
tp-gimp-images ScaleSeamlessEmbossDog softglow "$@"
tp-gimp-images ScaleSeamlessEmboss edgesobel "$@"
tp-gimp-images ScaleSeamlessEmbossEdgesobel dog "$@"
tp-gimp-images ScaleSeamlessEmbossEdgesobel sobel "$@"
tp-gimp-images ScaleSeamlessEmboss laplace "$@"
tp-gimp-images ScaleSeamlessEmboss mosaic "$@"
tp-gimp-images ScaleSeamlessEmbossMosaic sobel "$@"
tp-gimp-images ScaleSeamlessEmboss sharpen "$@"
tp-gimp-images ScaleSeamlessEmbossSharpen dog "$@"
tp-gimp-images ScaleSeamlessEmbossSharpen emboss "$@"
tp-gimp-images ScaleSeamlessEmbossSharpen enhance "$@"
tp-gimp-images ScaleSeamlessEmbossSharpen sobel "$@"
tp-gimp-images ScaleSeamlessEmboss sobel "$@"
tp-gimp-images ScaleSeamlessEmbossSobel dog "$@"
tp-gimp-images ScaleSeamlessEmbossSobel softglow "$@"
tp-gimp-images ScaleSeamlessEmboss softglow "$@"
tp-gimp-images ScaleSeamlessEmbossSoftglow softglow "$@"
tp-gimp-images ScaleSeamlessEnhance cartoon "$@"
tp-gimp-images ScaleSeamlessEnhanceCartoon edgesobel "$@"
tp-gimp-images ScaleSeamlessEnhanceCartoon sobel "$@"
tp-gimp-images ScaleSeamlessEnhance dog "$@"
tp-gimp-images ScaleSeamlessEnhanceDog dog "$@"
tp-gimp-images ScaleSeamlessEnhanceDog sharpen "$@"
tp-gimp-images ScaleSeamlessEnhance edgelaplace "$@"
tp-gimp-images ScaleSeamlessEnhanceEdgelaplace dog "$@"
tp-gimp-images ScaleSeamlessEnhance edgesobel "$@"
tp-gimp-images ScaleSeamlessEnhanceEdgesobel cartoon "$@"
tp-gimp-images ScaleSeamlessEnhanceEdgesobel dog "$@"
tp-gimp-images ScaleSeamlessEnhanceEdgesobel laplace "$@"
tp-gimp-images ScaleSeamlessEnhance emboss "$@"
tp-gimp-images ScaleSeamlessEnhanceEmboss dog "$@"
tp-gimp-images ScaleSeamlessEnhanceEmboss edgesobel "$@"
tp-gimp-images ScaleSeamlessEnhance enhance "$@"
tp-gimp-images ScaleSeamlessEnhanceEnhance dog "$@"
tp-gimp-images ScaleSeamlessEnhanceEnhance sobel "$@"
tp-gimp-images ScaleSeamlessEnhance gauss "$@"
tp-gimp-images ScaleSeamlessEnhanceGauss oilify "$@"
tp-gimp-images ScaleSeamlessEnhanceGauss sharpen "$@"
tp-gimp-images ScaleSeamlessEnhance laplace "$@"
tp-gimp-images ScaleSeamlessEnhanceLaplace edgesobel "$@"
tp-gimp-images ScaleSeamlessEnhance neon "$@"
tp-gimp-images ScaleSeamlessEnhanceNeon dog "$@"
tp-gimp-images ScaleSeamlessEnhance noise "$@"
tp-gimp-images ScaleSeamlessEnhanceNoise cartoon "$@"
tp-gimp-images ScaleSeamlessEnhanceNoise dog "$@"
tp-gimp-images ScaleSeamlessEnhance oilify "$@"
tp-gimp-images ScaleSeamlessEnhanceOilify edgesobel "$@"
tp-gimp-images ScaleSeamlessEnhanceOilify sobel "$@"
tp-gimp-images ScaleSeamlessEnhance sharpen "$@"
tp-gimp-images ScaleSeamlessEnhanceSharpen dog "$@"
tp-gimp-images ScaleSeamlessEnhanceSharpen emboss "$@"
tp-gimp-images ScaleSeamlessEnhanceSharpen laplace "$@"
tp-gimp-images ScaleSeamlessEnhance sobel "$@"
tp-gimp-images ScaleSeamlessEnhanceSobel cartoon "$@"
tp-gimp-images ScaleSeamlessEnhanceSobel dog "$@"
tp-gimp-images ScaleSeamlessEnhance softglow "$@"
tp-gimp-images ScaleSeamlessEnhanceSoftglow dog "$@"
tp-gimp-images ScaleSeamlessEnhance spread "$@"
tp-gimp-images ScaleSeamlessEnhanceSpread oilify "$@"
tp-gimp-images ScaleSeamlessGauss desaturate "$@"
tp-gimp-images ScaleSeamlessGaussDesaturate emboss "$@"
tp-gimp-images ScaleSeamlessGauss dog "$@"
tp-gimp-images ScaleSeamlessGaussDog dog "$@"
tp-gimp-images ScaleSeamlessGauss emboss "$@"
tp-gimp-images ScaleSeamlessGaussEmboss emboss "$@"
tp-gimp-images ScaleSeamlessGauss mosaic "$@"
tp-gimp-images ScaleSeamlessGaussMosaic oilify "$@"
tp-gimp-images ScaleSeamlessGauss noise "$@"
tp-gimp-images ScaleSeamlessGaussNoise cartoon "$@"
tp-gimp-images ScaleSeamlessGauss oilify "$@"
tp-gimp-images ScaleSeamlessGaussOilify edgesobel "$@"
tp-gimp-images ScaleSeamlessGaussOilify emboss "$@"
tp-gimp-images ScaleSeamlessGauss sharpen "$@"
tp-gimp-images ScaleSeamlessGaussSharpen oilify "$@"
tp-gimp-images ScaleSeamlessGauss spread "$@"
tp-gimp-images ScaleSeamlessGaussSpread oilify "$@"
tp-gimp-images ScaleSeamlessLaplace cartoon "$@"
tp-gimp-images ScaleSeamlessLaplaceCartoon dog "$@"
tp-gimp-images ScaleSeamlessLaplace edgesobel "$@"
tp-gimp-images ScaleSeamlessLaplaceEdgesobel dog "$@"
tp-gimp-images ScaleSeamlessMosaic cartoon "$@"
tp-gimp-images ScaleSeamlessMosaicCartoon emboss "$@"
tp-gimp-images ScaleSeamlessMosaicCartoon enhance "$@"
tp-gimp-images ScaleSeamlessMosaic edgesobel "$@"
tp-gimp-images ScaleSeamlessMosaicEdgesobel dog "$@"
tp-gimp-images ScaleSeamlessMosaic enhance "$@"
tp-gimp-images ScaleSeamlessMosaicEnhance gauss "$@"
tp-gimp-images ScaleSeamlessMosaicEnhance softglow "$@"
tp-gimp-images ScaleSeamlessMosaic gauss "$@"
tp-gimp-images ScaleSeamlessMosaicGauss cartoon "$@"
tp-gimp-images ScaleSeamlessMosaicGauss oilify "$@"
tp-gimp-images ScaleSeamlessNeon edgesobel "$@"
tp-gimp-images ScaleSeamlessNeonEdgesobel edgelaplace "$@"
tp-gimp-images ScaleSeamlessNeon gauss "$@"
tp-gimp-images ScaleSeamlessNeonGauss dog "$@"
tp-gimp-images ScaleSeamlessNeon softglow "$@"
tp-gimp-images ScaleSeamlessNeonSoftglow dog "$@"
tp-gimp-images ScaleSeamlessNoise cartoon "$@"
tp-gimp-images ScaleSeamlessNoiseCartoon dog "$@"
tp-gimp-images ScaleSeamlessNoiseCartoon emboss "$@"
tp-gimp-images ScaleSeamlessNoise mosaic "$@"
tp-gimp-images ScaleSeamlessNoiseMosaic oilify "$@"
tp-gimp-images ScaleSeamlessNoise oilify "$@"
tp-gimp-images ScaleSeamlessNoiseOilify cartoon "$@"
tp-gimp-images ScaleSeamlessNoiseOilify dog "$@"
tp-gimp-images ScaleSeamlessNoiseOilify emboss "$@"
tp-gimp-images ScaleSeamlessNoiseOilify oilify "$@"
tp-gimp-images ScaleSeamlessOilify cartoon "$@"
tp-gimp-images ScaleSeamlessOilifyCartoon dog "$@"
tp-gimp-images ScaleSeamlessOilifyCartoon sobel "$@"
tp-gimp-images ScaleSeamlessOilify emboss "$@"
tp-gimp-images ScaleSeamlessOilifyEmboss edgelaplace "$@"
tp-gimp-images ScaleSeamlessOilifyEmboss enhance "$@"
tp-gimp-images ScaleSeamlessOilify oilify "$@"
tp-gimp-images ScaleSeamlessOilifyOilify edgesobel "$@"
tp-gimp-images ScaleSeamlessOilify sharpen "$@"
tp-gimp-images ScaleSeamlessOilifySharpen edgesobel "$@"
tp-gimp-images ScaleSeamlessOilify spread "$@"
tp-gimp-images ScaleSeamlessOilifySpread oilify "$@"
tp-gimp-images ScaleSeamlessSharpen cartoon "$@"
tp-gimp-images ScaleSeamlessSharpenCartoon dog "$@"
tp-gimp-images ScaleSeamlessSharpenCartoon laplace "$@"
tp-gimp-images ScaleSeamlessSharpen edgesobel "$@"
tp-gimp-images ScaleSeamlessSharpenEdgesobel edgelaplace "$@"
